<?php
echo (integer) ((date("s") / (60 / (8 * 2))) % 8);
?>